<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center agreement_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub agreement_fd0_0'>
				<view class='flex flex-wrap align-center justify-center agreement_fd0_0_c0' @tap.stop="handleJumpDiy"
					data-type="back" data-url="1">
					<text class='fu-iconfont2  agreement_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">&#xE794;</text>
				</view>
				<view class='flex flex-wrap align-stretch justify-center'>
					<text class='agreement_fd0_0_c1_c0' v-if="id == 1">用户注册协议</text>
					<text class='agreement_fd0_0_c1_c0' v-if="id == 2">隐私政策</text>
				</view>
				<view class='flex flex-wrap align-center agreement_fd0_0_c0'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		
		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#cd962d"></u-loading>
			<view class="loading_text">加载中</view>
		</view>
		<!---flex布局flex布局开始-->
		<view class="flex flex-direction flex-wrap align-center benben-flex-layout" v-else>
			<view class="agreement_fd1_0">
				<u-parse :html="data.body"></u-parse>
			</view>
		</view>

		<!---flex布局flex布局结束-->


	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"data": {
					"name": "",
					"aid": "",
					"body": "",
					"thumb_img": "",
					"introduce": ""
				},
				"id": "1",
				"isShow": true
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				id
			} = options
			if (id !== undefined) this.id = id
			
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.isShow = true;
			this.getDataFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取注销说明
			async getDataFunc() {
				//请求方法
				//数据验证

				let datadata = await this.$api.post(global.apiUrls.post636c78ae2216b, {
					aid: this.id
				});
				if (datadata.data.code != 1) {
					this.$message.info(datadata.data.msg);
					return
				}
				let infodata = datadata.data;
				this.data = infodata.data;
				setTimeout(() => {
					this.isShow = false;
				}, 500)
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto !important;
	}

	.agreement_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.agreement_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #333;
		line-height: 88rpx;
	}

	.agreement_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.agreement_fd0_0_c0 {
		width: 50rpx;
		height: 50rpx;
	}

	.agreement_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	::v-deep .agreement_fd1_0 {
		width: 100%;
		padding: 24rpx 32rpx 24rpx 32rpx;
	}
</style>